import requests

from common.get_header import get_header
from config import URL


# 获取部门树
class YYdeptTree(object):
    url = URL + 'user/deptTree'
    header = get_header()

    @classmethod
    def yy_dept_tree(cls):
        resp = requests.get(url=cls.url, headers=cls.header)
        return resp


if __name__ == '__main__':
    res = YYdeptTree.yy_dept_tree()
    print(res.json())
